package com.server.limit.service;


import com.server.limit.ILimitManager;
import com.server.limit.LimitStrategyFactory;
import jakarta.annotation.PostConstruct;

/**
 * @title: AbstractLimitService
 * @author: gyuan
 * @description
 * @date: 2023-11-10 10:13
 */
public abstract class AbstractLimitManagerService implements ILimitManager {

    @PostConstruct
    private void init() {
        LimitStrategyFactory.register(getStrategyName(), this);
    }

    /**
     * 获取策略名称
     *
     * @return
     */
    protected abstract String getStrategyName();

}
